package com.wlsk.license.controller.third;

import com.wlsk.license.common.result.Result;
import com.wlsk.license.dto.OpenOrderPlateDto;
import com.wlsk.license.dto.request.AuthenticationReqDto;
import com.wlsk.license.dto.request.OpenOrderPlateInfoReqDto;
import com.wlsk.license.dto.response.AuthenticationResultDto;
import com.wlsk.license.dto.response.OpenOrderPlateResDto;
import com.wlsk.license.service.IOpenApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/open/api")
@Api(tags = "第三方开发接口")
public class ThirdOpenController {

    @Autowired
    private IOpenApiService openApiService;

    @ApiOperation(value = "查询包车牌申请列表")
    @PostMapping("/findApplyList")
    public Result<OpenOrderPlateResDto> findOrderPlateList(@RequestBody OpenOrderPlateInfoReqDto reqDto) {
        return Result.success(openApiService.findOrderPlateInfo(reqDto));
    }

    @ApiOperation(value = "包车牌申请状态变化推送")
    @PostMapping("/pushApplyInfo")
    public Result<Void> pushOrderPlateInfo(@RequestBody OpenOrderPlateDto reqDto) {
        return Result.success();
    }
}
